#include <QApplication>
#include <QDebug>
#include <QMap>
#include <QSettings>

#include "widget.h"

int main(int argc, char *argv[])
{
    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
    //    qInstallMsgHandler(OutPutMessage);
    QApplication a(argc, argv);
    QThread::currentThread()->setObjectName("MainThread");

    QTranslator translator;
    QSettings   BasicIniRead("Station.ini", QSettings::IniFormat);

    BasicIniRead.setIniCodec(QTextCodec::codecForName("UTF-8"));
    QString FilePath = QString("/home/forlinx/") + BasicIniRead.value("BASIC/DefaultLanguage").toString() + QString(".qm");
    qDebug() << "FilePath = " << FilePath;
    qDebug() << "load = " << translator.load(FilePath);
    a.installTranslator(&translator);

    Widget w;
    w.setStyleSheet("*{outline:0px;}");  //隐藏控件虚线框

    w.show();
    return a.exec();
}
